import React, {Component} from 'react'
import { Link, Switch, Route } from 'react-router-dom'
import {  } from 'react-router-dom/cjs/react-router-dom.min'
class Index extends Component {
    render() {
        window.test = this
        return (
            <div>
                路由练习
                <Link to="/test/one">二级路由1</Link>
                <Link to="/test/two">二级路由2</Link>
                <Switch>
                    <Route path="/test/one" render={_ => <div>one组件</div>}></Route>
                    <Route path="/test/two" render={_ => <div>two组件</div>}></Route>
                </Switch>
            </div>
        )
    }
}
export default Index